/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package de.blitzcoder.collide.gui;

import javax.swing.Icon;
import javax.swing.tree.DefaultMutableTreeNode;

/**
 *
 * @author blitzcoder
 */
public class IconTreeNode extends DefaultMutableTreeNode {

    private Icon icon;
    private boolean marked = false;

    public IconTreeNode(Object caption,Icon icon) {
        super(caption);
        this.icon = icon;
    }

    public void setMarked(boolean m) {
        marked = m;
    }
    
    public boolean isMarked() {
        return marked;
    }

    public Icon getIcon() {
        return icon;
    }

    public boolean equals(Object o) {
        if (o instanceof IconTreeNode)
            return getUserObject().equals( ((IconTreeNode)o).getUserObject() );
        return getUserObject().equals(o);
    }
    
}
